package com.qf.controller;

import com.qf.vo.ResultVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {
    @GetMapping("/user/login")
    public ResultVo login(String username,String password){
        System.out.println(username);
        System.out.println(password);

        if(username.equals("admin") && password.equals("123456")){
            String token = "abc.123.obj";
            return new ResultVo(200,"ok",token);
        }else {
            return new ResultVo(-1,"error","用户或者密码错误");
        }
    }
}
